package easybooking.report;

import java.util.*;
import java.io.Serializable;

/**
 * Base class of all reports. Reports are declared as <code>Serializable</code>
 * to be network-compatible.
 * After this the access to the reports happens locally at the client. This is an alternative to get
 * access to information, which is provided by the server.
 *
 * The decision of the realization by using <code>Serializable</code> or <code>UnicastRemoteObject</code>
 * should be thought twice. The frequency of access, a possible competing access
 * and the up-to-dateness of the data should be taken into consideration.
 *
 * A report has a few standard elements, which are documented as attributes.
 *
 * @see Report
 * @author Hakan Keles
 */
// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.A4223593-E428-4EF7-A494-430727BF90D6]
// </editor-fold> 
public abstract class Report implements Serializable {

    /**
     * Individual title of the report.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.92DABA59-99F8-9283-ABE2-0289C4BF19A8]
    // </editor-fold> 
    private String title = "Report";
    /**
     * Date, on which the report was generated.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1456F921-B7D9-9C9E-5E5A-FFCC7EEBF1EB]
    // </editor-fold> 
    private Date dateTime = new Date();
    /**
     * Content of the report.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.7FB94F95-35A9-8760-75D7-CBB67A00F148]
    // </editor-fold> 
    private String content = "";
    /**
     * Header data of the report.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.EF895362-0D8B-9696-C81A-0A35F7AB27EB]
    // </editor-fold> 
    private Paragraph header = null;
    /**
     * A small imprint.
     */
    private Paragraph imprint = null;

    /**
     * Constructor
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.99A03436-14A0-053E-96CF-F47FDD218CEA]
    // </editor-fold> 
    public Report() {
    }

    /**
     * Read-out the content.
     * @return Text of the content.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.04BA1EEF-8B80-8544-F614-9F06D7A219AB]
    // </editor-fold> 
    public String getContent() {
        return this.content;
    }

    /**
     * Set the content.
     * @param content content-text
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.C67C3455-D4D8-991A-2810-7C4A744BCE10]
    // </editor-fold> 
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * Read-out the Date.
     * @return The date of the report.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.0A8AA504-F3F0-2F9C-9222-2114BC60B5D7]
    // </editor-fold> 
    public Date getDateTime() {
        return dateTime;
    }

    /**
     * Set the date of the report.
     * @param dateTime Date of the report
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.43D54F20-5A66-C0EF-50CB-8F698104034B]
    // </editor-fold> 
    public void setDateTime(Date dateTime) {
        this.dateTime = dateTime;
    }

    /**
     * Read-out the header data.
     * @return The header-text.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.EEA6DB38-29EA-39C0-DA02-FF3F015ADA4F]
    // </editor-fold> 
    public Paragraph getHeader() {
        return this.header;
    }

    /**
     * Set the header.
     * @param header header-text
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.0B775981-DC7D-DC60-EC89-92519D50D74B]
    // </editor-fold> 
    public void setHeader(Paragraph header) {
        this.header = header;
    }

    /**
     * Read-out the title.
     * @return The title of the report.
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.BC4ECF6C-5C31-D2B2-41F2-7AAF00182E5C]
    // </editor-fold> 
    public String getTitle() {
        return this.title;
    }

    /**
     * Set the title.
     * @param title title-text
     */
    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,regenBody=yes,id=DCE.BBB6F536-D2B6-1933-641E-63EB6A668ABE]
    // </editor-fold> 
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * Reads-out the imprint.
     * @return text of the imprint
     */
    public Paragraph getImprint() {
        return imprint;
    }

    /**
     * Sets the imprint.
     * @param imprint imprint text
     */
    public void setImprint(Paragraph imprint) {
        this.imprint = imprint;
    }
}

